#import
comes from Objective-C and is a variant of #include
. GCC does support it, but it requires the users of a header
file to know that it should only be included once. It is much better for the header file’s implementor to write the file so that users don’t need to
know this. Using a wrapper #ifndef
accomplishes this goal.
Noncompliant code example
#import "foo.h" // Noncompliant
Compliant solution
#include "foo.h"